import axios from 'axios'

export const DrugsService = class DrugsService {
    static drugsService = null
    requestUrl = '/drugs/medicines'

    static getInstance() {
        if(this.drugsService == null){
            this.drugsService = new DrugsService()
        }
        return this.drugsService
    }

    /**
     * 分页查询药品
     * @param params
     */
    pageQuery(params){
        return axios.get(`${this.requestUrl}/page`,{
            params
        })
    }
}
